]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
iconGrid: Cancel animations on unmap
authorFlorian Müllner <fmuellner@gnome.org>
Mon, 17 Jul 2017 19:58:47 +0000 (21:58 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 19 Jul 2017 08:49:54 +0000 (10:49 +0200)
We now cancel animations on override, however we also want to cancel
animations altogether on unmap (that is, when hiding the overview)
to avoid icons swarming into the void.

https://bugzilla.gnome.org/show_bug.cgi?id=736148

js/ui/iconGrid.js

index bd3c453c64b35ac68bbf133fa68a40d2e752168d..deb91e9a570c330233258b1569ad75717d02f222 100644 (file)
@@ -276,6 +276,13 @@ var IconGrid = new Lang.Class({
         this.actor.add(this._grid, { expand: true, y_align: St.Align.START });
         this.actor.connect('style-changed', Lang.bind(this, this._onStyleChanged));
 
+        // Cancel animations when hiding the overview, to avoid icons
+        // swarming into the void ...
+        this.actor.connect('notify::mapped', () => {
+            if (!this.actor.mapped)
+                this._cancelAnimation();
+        });
+
         this._grid.connect('get-preferred-width', Lang.bind(this, this._getPreferredWidth));
         this._grid.connect('get-preferred-height', Lang.bind(this, this._getPreferredHeight));
         this._grid.connect('allocate', Lang.bind(this, this._allocate));